package com.itrencai.d12_Recurtion.properies;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

//使用properties把键值对存入到属性文件中去
public class PropertiesDemo1 {
    public static void main(String[] args) throws Exception {
        Properties properties =new Properties();
        properties.setProperty("admin","123456");
        properties.setProperty("dlei","003197");
        properties.setProperty("heima","itcast");
        System.out.println(properties);

        //参数一：保存管道，字符输出流管道
        //参数二：保存心得
        properties.store(new FileWriter("E:\\javalearn\\opp-app\\oop-app\\src\\users.properities"),"i am very heppy!");





    }



}
